#ifndef CONFIGBOARDOPTIONS_H
#define CONFIGBOARDOPTIONS_H
//TODO http://qt.developpez.com/faq/?page=modules-qtcore-signauxetslots#signauxetslots
//TODO http://qt.developpez.com/faq/?page=modules-qtcore-signauxetslots#signauxetslots-creer
//TODO http://www.siteduzero.com/forum/sujet/qt-passage-de-donnee-d-une-fenetre-parent-a-une#message-84098366
#include <QMainWindow>
#include <QDebug>
#include"mainwindow.h"
namespace Ui {
class ConfigBoardOptions;
}

class ConfigBoardOptions : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit ConfigBoardOptions(QWidget *parent = 0);
    ~ConfigBoardOptions();
    QString access_add(void);
    QString access_xml_path(void);
    QString access_post_path(void);
    QString access_uri_get(void);
    QString access_uri_post(void);
    QString access_cookie(void);
private:
    Ui::ConfigBoardOptions *ui;
    QString user_name;
    QString add;
    QString cookie;
    QString xml_file_add;
    QString post_path_file;
    QString uri_get;
    QString uri_post;
    QString ua;
    QString type_board_string;
    int type;
    bool reverse_order;
    int time;
private slots:
    void click_ok_button_conf_validate(void);
    void select_type(QString value);
    void plonk_type(int plonk_lvl);
    void select_ua(int type);
    void select_board(int board);
    void order_posts_in_chrono(bool value);
    void set_timer_value(int value);
public slots:
    void recoit_de_main_add(QString value);
    void recoit_de_main_xml_path(QString value);
    void recoit_de_main_cookie(QString value);
    void recoit_de_main_ua(QString value);
    void recoit_de_main_post_url(QString value);
    void recoit_de_main_tribune_post_type(QString type);
    void recoit_de_main_user_name(QString value);
    void recoit_de_main_ua_value(int value);
    void recoit_de_main_bool_set(bool val);
    void recoit_de_main_time(int temps);
    void set_add_conf(QString value);
    void set_xml_file_path(QString value);
    void set_post_path(QString value);
    void set_cookie_value(QString value);
    //void set_order_post(bool);
    void build_uri(void);
    void get_config_values();


signals:
    void send_config_data_val_add_to_file(QString);
    void send_config_data_val_cookie_to_file(QString);
    void send_config_data_val_post_url_to_file(QString);
    void send_config_data_val_xml_path_to_file(QString);
    void send_config_data_val_user_agent_to_file(QString);
    void send_config_data_post_method_to_file(QString);
    void send_user_name_to_file(QString);

    void send_time_value_to_file(int);
    void send_ua_value_select_to_file(int);
    void send_reverse_post_checked(bool);
    void send_ua_value_select(int);    
    void send_time_value(int);    
    void send_config_data_val_add(QString);
    void send_config_data_val_cookie( QString);
    void send_config_data_val_post_url(QString);
    void send_config_data_val_xml_path(QString);
    void send_config_data_val_user_agent(QString);
    void send_type_board(QString);
    void send_user_name(QString);
    void emit_fermeture();
};

#endif // CONFIGBOARDOPTIONS_H
